package com.codegeek.project.slope.service.impl;

import com.codegeek.project.slope.domain.SlopeGlare;
import com.codegeek.project.slope.mapper.SlopeGlareMapper;
import com.codegeek.project.slope.service.ISlopeGlareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 声光报警器Service业务层处理
 *
 * @author codegeek
 * @date 2020-02-17
 */
@Service
public class SlopeGlareServiceImpl implements ISlopeGlareService {
    @Autowired
    private SlopeGlareMapper slopeGlareMapper;

    /**
     * 查询声光报警器
     *
     * @param glareId 声光报警器ID
     * @return 声光报警器
     */
    @Override
    public SlopeGlare selectSlopeGlareById(Long glareId) {
        return slopeGlareMapper.selectSlopeGlareById(glareId);
    }

    /**
     * 查询声光报警器列表
     *
     * @param slopeGlare 声光报警器
     * @return 声光报警器
     */
    @Override
    public List<SlopeGlare> selectSlopeGlareList(SlopeGlare slopeGlare) {
        return slopeGlareMapper.selectSlopeGlareList(slopeGlare);
    }

    @Override
    public List<SlopeGlare> selectOnlineSlopeGlareList(SlopeGlare slopeGlare) {
        return slopeGlareMapper.selectOnlineSlopeGlareList(slopeGlare);
    }

    /**
     * 新增声光报警器
     *
     * @param slopeGlare 声光报警器
     * @return 结果
     */
    @Override
    public int insertSlopeGlare(SlopeGlare slopeGlare) {
        return slopeGlareMapper.insertSlopeGlare(slopeGlare);
    }

    /**
     * 修改声光报警器
     *
     * @param slopeGlare 声光报警器
     * @return 结果
     */
    @Override
    public int updateSlopeGlare(SlopeGlare slopeGlare) {
        return slopeGlareMapper.updateSlopeGlare(slopeGlare);
    }

    /**
     * 批量删除声光报警器
     *
     * @param glareIds 需要删除的声光报警器ID
     * @return 结果
     */
    @Override
    public int deleteSlopeGlareByIds(Long[] glareIds) {
        return slopeGlareMapper.deleteSlopeGlareByIds(glareIds);
    }

    /**
     * 删除声光报警器信息
     *
     * @param glareId 声光报警器ID
     * @return 结果
     */
    @Override
    public int deleteSlopeGlareById(Long glareId) {
        return slopeGlareMapper.deleteSlopeGlareById(glareId);
    }

    @Override
    public SlopeGlare selectSlopeGlareByImei(String imei) {
        return slopeGlareMapper.selectSlopeGlareByImei(imei);
    }

    @Override
    public SlopeGlare selectValidSlopeGlareByImei(String imei) {
        return slopeGlareMapper.selectValidSlopeGlareByImei(imei);
    }

}
